package com.yang.studentsapp.utils;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by ${Ян-Вэнь-Чао} on 2016/9/30.
 */
public class WorkFactory {
    private static ExecutorService executorService;

    private WorkFactory() {
        executorService = Executors.newCachedThreadPool();
    }

    private static class SingletonHolder {
        private static WorkFactory mInstance = new WorkFactory();
    }

    public static WorkFactory instance() {
        return SingletonHolder.mInstance;
    }

    public ExecutorService service() {
        return executorService;
    }
}
